package com.sunwayworld.basemodule.business.qualitycontrol.qualitycontrolresult.resource;

import com.alibaba.fastjson.JSONObject;
import com.sunwayworld.basemodule.business.qualitycontrol.qualitycontrolresult.bean.LimsQualitycontrolTestResultBean;
import com.sunwayworld.basemodule.business.qualitycontrol.qualitycontrolresult.service.LimsQualitycontrolTestResultService;
import com.sunwayworld.framework.data.page.Page;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@RequestMapping("/secure/basemodule/business/qualitycontrol/qualitycontrol-test-results")
public interface LimsQualitycontrolTestResultResource extends GenericResource<LimsQualitycontrolTestResultService, LimsQualitycontrolTestResultBean, Long> {

    @PostMapping(value = "/insert-testresult")
    String insertTestResult(RestJsonWrapperBean jsonWrapperBean);

    @PostMapping(value = "/getchosable-professionalgroup")
    JSONObject getChosableProfessionalGroup(RestJsonWrapperBean jsonWrapperBean);

    @PostMapping(value = "/selectdistinctrows")
    Page<LimsQualitycontrolTestResultBean> selectDistinctRows(RestJsonWrapperBean wrapper);

    @PostMapping(value = "/saveto-managetable")
    JSONObject saveToManageTable(RestJsonWrapperBean wrapper);

    @PostMapping(value = "/update-testresult")
    JSONObject updateTestResult(RestJsonWrapperBean jsonWrapperBean);

    @PostMapping(value = "/submit")
    JSONObject submit(RestJsonWrapperBean wrapperBean);

    @PostMapping(value = "/back")
    JSONObject back(RestJsonWrapperBean wrapperBean);
}
